Leetcode解题思想总结篇:双指针 1概念 双指针:快慢指针。 快指针在每一步走的步长要比慢指针一步走的步长要多。快指针通常的步速是慢指针的2倍。 在循环中的指针移动通常为: faster ...
Leetcode解题思想总结篇:双指针 1概念 双指针:快慢指针。 快指针在每一步走的步长要比慢指针一步走的步长要多。快指针通常的步速是慢指针的2倍。 在循环中的指针移动通常为: faster ...
Given an integer array arr, remove a subarray (can be empty) from arr such that the remaining elemen ...
You are given a string containing only 4 kinds of characters 'Q', 'W', 'E' and 'R'. A string is sai ...
原题链接在这里:https://leetcode.com/problems/intersection-of-three-sorted-arrays/ 题目: Given three integer ...
传送门:http://codeforces.com/contest/939/problem/C 某星球的一天被划分成n个小时,于是这个星球的世界被划分成n个时区,标记为1~n。 一个时区的“本地时 ...